package edu.whu.demo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import edu.whu.demo.domain.User;
import com.baomidou.mybatisplus.extension.service.IService;
import edu.whu.demo.exception.AccountException;
import org.springframework.web.multipart.MultipartFile;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 
 * @since 2022-11-24
 */
public interface IUserService extends IService<User> {

    //账号删除
    void deleteAccount(Long id);

    //账号查询

    User getAccount(Long id);

    IPage<User> findAccount(Map<String, Object> condition, Integer pageNum, Integer pageSize);

    //账号信息修改
    void updateAccount(Long id,User user) throws AccountException;

    User getUserByName(String username);

    boolean userLogin(String name,String password);

/*    boolean userRegisterSms(String name);*/

    void userRegister(User user);

    boolean userRegisterSms(String name);

    boolean userPasswordChange(String name,String password,String newPassword);

    boolean userPasswordBySms(String name,String newPassword);

    String userGetEmail(String name);

    public String uploadPicture(Long id, MultipartFile pic) throws AccountException;

}
